;$(function(){
	//footer切换图标
	
	$('#footer .footer-1').click(function(){

		if($(this).attr('src') == '/themes/simplebootx/Public/images/bottom/1-1.png'){
			$(this).attr('src','/themes/simplebootx/Public/images/bottom/1.png');
		}else{
			$(this).attr('src','/themes/simplebootx/Public/images/bottom/1-1.png');
		}
	});
	$('#footer .footer-2').click(function(){
		if($(this).attr('src') == '/themes/simplebootx/Public/images/bottom/2-1.png'){
			$(this).attr('src','/themes/simplebootx/Public/images/bottom/2.png');
		}else{
			$(this).attr('src','/themes/simplebootx/Public/images/bottom/2-1.png');
		}
	});
	$('#footer .footer-3').click(function(){
		if($(this).attr('src') == '/themes/simplebootx/Public/images/bottom/3-1.png'){
			$(this).attr('src','/themes/simplebootx/Public/images/bottom/3.png');
		}else{
			$(this).attr('src','/themes/simplebootx/Public/images/bottom/3-1.png');
		}
	});
	$('#footer .footer-4').click(function(){
		if($(this).attr('src') == '/themes/simplebootx/Public/images/bottom/4-1.png'){
			$(this).attr('src','/themes/simplebootx/Public/images/bottom/4.png');
		}else{
			$(this).attr('src','/themes/simplebootx/Public/images/bottom/4-1.png');
		}
	});
	$('#footer .footer-5').click(function(){
		if($(this).attr('src') == '/themes/simplebootx/Public/images/bottom/5-1.png'){
			$(this).attr('src','/themes/simplebootx/Public/images/bottom/5.png');
		}else{
			$(this).attr('src','/themes/simplebootx/Public/images/bottom/5-1.png');
		}
	});
	
	//点击预约判断会员否？	
	//非会员预约正则验证姓名与电话号码
	var Data = {};
		Data.user_name = /^[\u2E80-\u9FFF]{2,4}$/;
		Data.user_tel = /^1[3|4|5|7|8]\d{9}$/;
	$('#no-member').click(function(){
		if(!Data.user_name.test($('#user-pic').val()) || !Data.user_name.test($('#tel-pic').val())){
			if(!Data.user_name.test($('#user-pic').val())){
				alert('请填写真实姓名');
				return false;
			}else if(!Data.user_tel.test($('#tel-pic').val())){
				alert('请填写正确的手机号');
				return false;
			}
		}	
	});
	//评价输入信息不能少于5个字符
	/*
	$('#judgecommit').click(function(){
		if($('#teacher-judge').val().length<5){
			alert('请填写5字以上评价');
			return false;
		}
	});
	*/
	//个人信息修改验证
		Data.userage = /^\d{1,3}$/;
	$('#user-sub').click(function(){
		if(!Data.userage.test($('#u-age').val()) || !Data.user_tel.test($('#user-tel').val()) || !$('#user-nick').val()){
			if(!$('#user-nick').val()){
				alert('真实姓名不能为空');
				return false;
			}else if(!Data.user_tel.test($('#user-tel').val())){
				alert('请填写正确的手机号');
				return false;
			}
		}
	});
});
